﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace ShareOsNetLib
{
	public class SosFunction
	{
		[Key]
		public UInt32 UID { get; set; }						// Local identifier - only used on this system
		public UInt32 Author { get; set; }					// Author of this function
		public Guid GUID { get; set; }						// Global identifier - used globally to refer to this particular function
		public Guid PreviousVersion { get; set; }			// Previous version of this function, if it exists
		public string VersionString { get; set; }			// The version number of this particular function
		[StringLength(255)]
		public new string DefaultName { get; set; }			// A fully qualified default name
		public SosType? FirstParameterType { get; set; }	// The first parameter type - becomes a member function
		public SosType? ReturnType { get; set; }			// The return type
		public virtual ICollection<SosParameter> Parameters { get; set; }	// Other possible parameters
		public bool IsConst { get; set; }					// Is this a const function?
		public bool NoThrow { get; set; }					// Does this function throw any exceptions?
		public ProtectionLevel Protection { get; set; }		// Is this for the public?  Is it protected just for those with access? or is it internal and only to be used on the local machine?
		public virtual ICollection<SosParameter>? GenericParameters { get; set; }	// Generic Type Parameters
	}
}
